package com.pengxun.manager.service.system.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.pengxun.manager.dao.system.PermissionCodeTypeDao;
import com.pengxun.manager.model.system.PermissionCodeType;
import com.pengxun.manager.service.system.PermissionCodeTypeService;
import com.szeastroc.common.jdbc.page.Page;


@Service
public class PermissionCodeTypeServiceImpl implements PermissionCodeTypeService{

	@Resource
	private PermissionCodeTypeDao permissionCodeTypeDao;
	
	@Override
	public int insert(PermissionCodeType permissionCodeType) {
		return permissionCodeTypeDao.insert(permissionCodeType);
	}
	
    @Override
    public int update(PermissionCodeType permissionCodeType){
        return permissionCodeTypeDao.update(permissionCodeType);
    }
   	
    @Override
    public int delete(Integer id){
       return permissionCodeTypeDao.delete(id);
 	}
   
    @Override
    public Page findByPage(Page page){
    	 List<PermissionCodeType> permissionCodeTypes = permissionCodeTypeDao.findByPage(page);
    	 page.setData(permissionCodeTypes);
         return page;
    }
    
    public PermissionCodeType findById(Integer id){
          return permissionCodeTypeDao.findById(id);
    }

	@Override
	public List<PermissionCodeType> findAll() {
		return permissionCodeTypeDao.findAll();
	};

	
}
